import { cardCache, toast } from 'nc-lightapp-front';
import config from '../config';
const { setDefData } = cardCache;

//查询区按钮点击事件
export default function (props, data) {
    const searchData = this.props.search.getAllSearchData(config.headcode);
    console.log('======searchData:', searchData);
    if (searchData && searchData.conditions) {
        setDefData(config.searchCache, config.datasource, searchData);
    } else {
        setDefData(config.searchCache, config.datasource, {
            logic: 'and',
            conditions: []
        });
    }
    this.loadData();
}
